package ningbo.day05.method;

/**
 * @Author 宁铂
 * @Date 2021/7/18 12:33
 * @Version 1.0
 */
public class TestMethodOverload {
    /** 测试方法的重载 */
    public static void main(String[] args) {
        method m = new method();
        method m1 = new method(3);
        method m2 = new method(3,5);

    }
}

class method{
      method(){
        System.out.println("无参");
    }

     method(int i){
        System.out.println("含参");
    }

     method(int i , int c){
        System.out.println("全参");
         System.out.println(i+c);
    }
}
